﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Projectmanagement.Entity;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Projectmanagement.Utl;

namespace Projectmanagement.Models
{
    public class _Motorcade : EntityBase
    {
        [Display(Name = "车型"), Required]
        public string MotorcycleType { get; set; }
        [Display(Name = "价格"), Required]
        public string MotorcyclePrice { get; set; }
        [Display(Name = "说明"), Required]
        public string MotorcycleDesc { get; set; }

        [Display(Name = "城市"), Required]
        public int? City { get; set; }


        public IEnumerable<SelectListItem> GetCitySelectListItems()
        {
            var selectList = CH.DB.Citys.ToList().Select(a => new SelectListItem
            {
                Text = a.Name,
                Value = a.ID.ToString()
            });
            return selectList;
        }

        [Display(Name = "联系人"), Required]
        public string TravelName { get; set; }
        [Display(Name = "联系方式"), Required]
        public string TravelWay { get; set; }
        [Display(Name = "其他联系方式"), Required]
        public string TravelOtherWay { get; set; }
        [Display(Name = "公司名称"), Required]
        public string ComyanyName { get; set; }

        [Display(Name = "文件上传")]
        public string MotorcadeFileId { get; set; }


    }
}